﻿@using WebAPP_LIULI.Models;
@{
    RewardPunishment m = Model;
    if (m == null)
    {
        m = new RewardPunishment();
    }
    User user = (User)Session["User"];
}

<!-- Page-Title -->
<div class="row">
    <div class="col-sm-12">

        <h4 class="page-title">奖罚管理</h4>
    </div>
</div>
<!-- end page title end breadcrumb -->


<div class="row">

    <div class="col-xl-3 col-md-6">
        <div class="card-box">
            <form class="form-horizontal" role="form" action="/Home/RewardPunishment" method="post">
                <input hidden="hidden" type="text" name="Id" value="@m.Id">

                <div class="form-group row">
                    <label class="col-md-2 col-form-label">奖罚类型</label>
                    <div class="col-md-10">
                        <select class="form-control" name="Type">
                            <option value="生产奖罚" @if (m.Type == "生产奖罚") { <text> selected </text> }>生产奖罚</option>
                            <option value="质量奖罚" @if (m.Type == "质量奖罚") { <text> selected </text> }>质量奖罚</option>
                            <option value="成本奖罚" @if (m.Type == "成本奖罚") { <text> selected </text> }>成本奖罚</option>
                            <option value="基础管理" @if (m.Type == "基础管理") { <text> selected </text> }>基础管理</option>
                            <option value="其他奖罚" @if (m.Type == "其他奖罚") { <text> selected </text> }>其他奖罚</option>
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-md-2 col-form-label">奖罚班组</label>
                    <div class="col-md-10">
                        <select class="form-control" name="Team">
                            @foreach (var c in ViewBag.teams)
                            {
                                <option value="@c">@c</option>
                            }

                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-md-2 col-form-label">奖罚金额</label>
                    <div class="col-md-10">
                        <input class="form-control" type="number" name="Count" value="@m.Count">
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-md-2 col-form-label">所属月份</label>
                    <div class="col-md-10">
                        <input class="form-control" type="month" name="Date" value="@m.Date">
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-md-2 col-form-label">备注</label>
                    <div class="col-md-10">
                        <textarea class="form-control" name="Remarks" id="Remarks" rows="2">@m.Remarks</textarea>
                    </div>
                </div>

                <input hidden="hidden" type="text" name="UserName" value="@user.UserName">

                <button type="submit" class="btn btn-block btn-xs btn-purple waves-effect waves-light">保存</button>
            </form>
        </div>
    </div><!-- end col -->

</div>
<!-- end row -->